﻿/****************************************************************************************************************
*                                                                                                               *
* Copyright (C) 2011 5173.com                                                                                   *
* This project may be copied only under the terms of the Apache License 2.0.                                    *
* Please visit the project Home Page http://bqqapicsharp.codeplex.com/ for more detail.                         *
*                                                                                                               *
****************************************************************************************************************/

namespace BQQAPIClient.Core.Business
{
    using System;
    using System.Collections.Generic;
    using BQQAPIClient.Core.Utility;

    public class KefuStatusList : List<KefuStatus>
    {
        internal static readonly byte TCount = 1;
    }

    public class KefuStatus : DebugBase
    {
        internal static readonly byte TKefuID = 226;
        private ushort kefuID;
        public ushort KefuID
        {
            get
            {
                return kefuID;
            }
            set
            {
                kefuID = value;
            }
        }

        internal static readonly byte TkefuStatusEnum = 227;
        private KefuStatusEnum kefuStatusEnum;
        public KefuStatusEnum KefuStatusEnum
        {
            get 
            {
                return kefuStatusEnum; 
            }
            set
            {
                if (kefuStatusEnum == Business.KefuStatusEnum.Offline) throw new ArgumentException("值不能显式设置为Offline", "KefuStatusEnum");
                kefuStatusEnum = value;
            }
        }

        internal static readonly byte TMaxAutoAssignCount = 229;
        private ushort maxAutoAssignCount;
        public ushort MaxAutoAssignCount
        {
            get
            { 
                return maxAutoAssignCount; 
            }
            set
            {
                if (value > 30) throw new ArgumentException("值不能大于30", "MaxAutoAssignCount");
                maxAutoAssignCount = value; 
            }
        }

        internal static readonly byte TisHostBySystem = 221;
        private byte isHostBySystem;
        public byte IsHostBySystem
        {
            get 
            { 
                return isHostBySystem;
            }
            set
            {
                if (value > 1) throw new ArgumentException("值只能是0或1", "IsHostBySystem");
                isHostBySystem = value;
            }
        }
    }
}
